import request from '@/utils/request'

// 新增车辆
export const addCarService = (carAddDTO) => {
  return request.post('/admin/car/add', carAddDTO)
}

// 车辆分页查询
export const carPageQueryService = (carPageQueryDTO) => {
  return request.get('/admin/car/page', { params: carPageQueryDTO })
}

// 根据车辆id查询车辆信息
export const getCarByIdService = (id) => {
  return request.get(`/admin/car/${id}`)
}

// 修改车辆信息
export const updateCarService = (carUpdateDTO) => {
  return request.put('/admin/car', carUpdateDTO)
}

// 删除车辆
export const deleteCarService = (id) => {
  return request.delete(`/admin/car/${id}`)
}
